
export const home_mixins = {
  methods:{
    setDate(date,str){
      let time = new Date(date * 1000);
      let y = time.getFullYear()
      let m = time.getMonth() + 1
      let d = time.getDate()
      let hh = time.getHours()
      let mm = time.getMinutes()
      m =  m  <  10 ? "0" + m : m
      d =  d  <  10 ? "0" + d : d
      hh =  hh  <  10 ? "0" + hh : hh
      mm =  mm  <  10 ? "0" + mm : mm
      return `${y}${str}${m}${str}${d} ${hh}:${mm}`
    }
  }
}